﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Business.Entities;
using Data.Database;

namespace Negocio
{
    public class MateriaLogic:BusinessLogic
    {
        Data.Database.MateriaAdapter materiadata;

        

        public MateriaLogic()
        { 
        
        materiadata=new MateriaAdapter();
        }

        public Data.Database.MateriaAdapter Materiadata
        {
            get { return materiadata; }
            set { materiadata = value; }
        }


        

        public List<Materia> getAll()
        {
            return (materiadata.GetAll());
        }

        public Materia getOne(int id)
        {
           return (materiadata.GetOne(id))  ;
        }

        public void delete(int id)
        {
            materiadata.Delete(id);
        }

        public void save(Business.Entities.Materia mtr)
        {
            materiadata.Save(mtr);
        }

    }
}
